package org.amphiprion.apiforanywebsite.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD })
public @interface WebElement {
	String cssSelector();

	ValueType valueType() default ValueType.OWN_TEXT;

	String attributeName() default "";

	public enum ValueType {
		/** Gets the combined text of this element and all its children. */
		TEXT,
		/**
		 * Retrieves the element's inner HTML. E.g. on a &lt;div&gt; with one
		 * empty &lt;p&gt; , would return &lt;p&gt;&lt;/p&gt;
		 */
		INNER_HTML,
		/**
		 * Retrieves the element's outer HTML. E.g. on a &lt;div&gt; with one
		 * empty &lt;p&gt; , would return
		 * &lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;
		 */
		OUTER_HTML,
		/**
		 * Gets the text owned by this element only; does not get the combined
		 * text of all children.
		 */
		OWN_TEXT,
		/** get The attribute value using the attributeName property */
		ATTRIBUTE

	}
}
